1. Field of the Invention
The present invention relates to a method and a system for thread scheduling. More particularly, the present invention relates to a method and a system for user-centric thread scheduling.
2. Description of the Related Art
In a modern operating system, a run-queue is maintained in which one thread is chosen as the next scheduled candidate for execution. Concerning fairness, each thread is assigned a time-slice which defines how long at most the thread is able to run at its scheduling interval. Priority is set for each thread as well to determine its execution order. The scheduler of the operating system inserts all runnable threads to a run-queue in prioritized order and picks up the thread with the highest priority as the next scheduled candidate to be executed by the processor.
User experience is a very important aspect of consumer electronic devices, such as smart phones, tablet computers and personal computers. However, the computing resources of a consumer electronic device are limited. When the processor of such a consumer electronic device is executing too many processes or threads at the same time, the user often feels obvious lag.